<?php
session_start();

if(!isset($_SESSION['userid'])){
    header("Location:login.html");
    exit();
}
include('test.php');
$userid = $_SESSION['userid'];
$user = $_SESSION['username'];
$user_query = mysql_query("select * from user_list where userid = '$userid' limit 1");
$row = mysql_fetch_array($user_query);
echo '用户信息：<br />';
echo '用户ID：',$userid,'<br />';
echo '用户名：',$username,'<br />';
echo '<a href="login.php?action=logout"登录<br />';
?>